package com.learner.course.repository;

import com.learner.pojo.course.CoursePlan;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 继承spring data
 * @author ice2020x
 */
@Repository
public interface CoursePlanRepository extends JpaRepository<CoursePlan,String> {

    /**
     * 通过课程id和等级查询
     *
     * @param courseId 课程id
     * @param parentId 父节点id
     * @return 结果
     */
    List<CoursePlan> findByCourseIdAndParentId(String courseId, String parentId);
}
